<style>.itemsWrap{*display:inline;float:left;overflow:hidden;}</style>
<div class="GoodsList-Tabs">
<#list tabList as tab>
      <div <#if tab.selected>class="current"</#if> style="float:left" tabid="tpc_${tab.id}" ><span>${tab.title}</span></div>
</#list>
</div>

<div class="GoodsListWrap">
 
  <#if setting.showTitleImg=="off">
    <div class="GoodsList">
      <#include 'GoodsCat.html' />
      <#include 'GoodsTabItem.html'/>
    </div>
  <#elseif setting.titleImgPosition=="top">
    <#include 'TitleImg.html'/>
    <div class="GoodsList">
      <#include 'GoodsCat.html' />
      <#include 'GoodsTabItem.html'/>
    </div>
  <#elseif setting.titleImgPosition=="center">
    <#include 'GoodsCat.html' />
    <#include 'TitleImg.html'/>
    <div class="GoodsList">
      <#include 'GoodsTabItem.html'/>
    </div>
  <#elseif setting.titleImgPosition=="bottom">
    <div class="GoodsList">
      <#include 'GoodsCat.html' />
      <#include 'GoodsTabItem.html'/>
    </div>
    <#include 'TitleImg.html'/>
  <#elseif setting.titleImgPosition=="left">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
      <td width="${setting.titleImgWidth}"><#include 'TitleImg.html'/></td>
      <td><div class="GoodsList">
        <#include 'GoodsCat.html' />
        <#include 'GoodsTabItem.html'/>
      </div>
      </td>
      </tr>
    </table>
  <#elseif setting.titleImgPosition=="right">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
      <td><div class="GoodsList">
        <#include 'GoodsCat.html' />
        <#include 'GoodsTabItem.html'/>
      </div>
      </td>
      <td width="${setting.titleImgWidth}"><#include 'TitleImg.html'/></td>
      </tr>
    </table>
  </#if>

</div>
<script type="text/javascript">
$(function(){
	var changeEffect= ${setting.changeEffect};
	var now = new Date().valueOf();
	var first= true;

	 function toggleTab(tab){
		$("#${widgetid} .GoodsList-Tabs>div").removeClass("current");
		tab.addClass("current");
		var tabid = tab.attr("tabid");
		$("#${widgetid} .tabContent ").hide();
		$("#"+tabid).fadeIn(200);		 
	 }

	$("#${widgetid} .GoodsList-Tabs>div").click(function(){
		toggleTab($(this));
	});
	if( changeEffect==0){
	$("#${widgetid} .GoodsList-Tabs>div").hover(function(){
		if(!first && new Date().valueOf() - now < 300) {  //阻止快速事件
			return false;
		}
		first=false;
		toggleTab($(this));
		now = new Date().valueOf();
	})
		}
})
</script>
